<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
	<title>微公交-车辆预定</title>
	<link rel="stylesheet" href="<%=path %>/css/amazeui.min.css" />
	<link rel="stylesheet" href="<%=path %>/css/wgj_style.css" />
	<script type="text/javascript" src="<%=path %>/js/jquery.min.js"></script>
	<script type="text/javascript">
		function getSite(){
			window.location.href="<%=path%>/yd_site.jsp";
		}
		function goCar(){
			var deptName=$.trim($("#deptName").val());
			var date =$.trim($("#date").val());
			if(deptName==null || deptName==""){
				alert("请选择站点");
				return;
			}else if(date==null || date==""){
				alert("请选择用车时间");
				return;
			}
			var dateh=$("#dateHl").text();
			var hour=$("#hour").val();
			var mintus=$("#mintus").val();
			$("#date").val(dateh+" "+hour+":"+mintus);
			$("#form1")[0].submit();
		}
		
	</script>
</head>

<body>
<form action="<%=path %>/carType/queryCarType" method="post" id="form1">
<section>
	<div class="quche mt30">
    	<div class="am-input-group am-input-group-lg">
          	<span class="am-input-group-label">取车站点</span>
          	<input type="text" class="am-form-field" id="deptName" value="${deptName }" name="reserveHour.TerminalName" onclick="getSite();">
          	<input type="hidden" name="reserveHour.carLocalId" value="${id }"/>
        </div>
    </div>
    <div class="quche" style="border-bottom:1px solid #dedede;">
    	<div class="am-input-group am-input-group-lg">
          	<span class="am-input-group-label">取车时间</span>
          	<span class="am-form-field">
          		<span id="dateHl"><fmt:formatDate value="<%=new Date() %>" pattern="yyyy年MM月dd日" /></span>
          		<input type="hidden" name="reserveHour.reserveDate" id="date" value="<fmt:formatDate value="<%=new Date() %>" pattern="yyyy年MM月dd日 HH:mm" />">
	          	<select id="hour">
	          		<option value="<fmt:formatDate value="<%=new Date() %>" pattern="HH" />"><fmt:formatDate value="<%=new Date() %>" pattern="HH" /></option>
	          		<option value="<%=new Date().getHours()*1+1%>"><%=new Date().getHours()*1+1%></option>
	          	</select>
	          	<select id="mintus">
	          		<option value="00">00</option>
	          		<option value="20">20</option>
	          		<option value="40">40</option>
	          	</select>
          	</span>
          	
        </div>
    </div>
</section>
</form>
<section id="Content">	
    <div class="mt30"><a class="yuanjiao green_btn" onclick="goCar();">去选车</a></div>
</section>
</body>
</html>

